package com.xmy.cultivate.mapper;

import com.xmy.cultivate.entity.GradeDetails;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 面试评分详情表 Mapper 接口
 * </p>
 *
 * @author hpiggy
 * @since 2024-11-28
 */
public interface GradeDetailsMapper extends BaseMapper<GradeDetails> {


    @Select({"<script>",
            "SELECT  *  FROM",
            "adms_grade_details",
            "WHERE",
            "id IN ( SELECT pid FROM adms_grade_details WHERE id IN ( SELECT grade_details_id FROM adms_estimate_details WHERE recruit_id = ${recruitId} AND type = ${type} ) ) ",
            "AND grade_module_id = ${gradeModuleId} ORDER BY sort",
            "</script>"})
    public List<GradeDetails> getGradeDetails(
                                                       @Param("gradeModuleId") Long gradeModuleId,
                                                       @Param("recruitId") Long recruitId,
                                                       @Param("type") Integer type);
}
